﻿using System;
using System.Reflection;
using Microsoft.Practices.Unity;

namespace TestByWire.Factories.StubbingStrategies
{
    internal class ActivatorStrategy : StubStrategyBase
    {

        public override bool RegisterOnContainer
        {
            get { return false; }
        }

        public override bool CanHandleType(Type type, string instanceName)
        {
        	return type.IsValueType;
        }

		public override bool CompletesBuild
		{
			get
			{
				return true;
			}
		}

        protected override object TryCreateInstance(Type type)
        {
            return Activator.CreateInstance(type);
        }
    }
}
